package com.miyake.dsp.common;

import org.apache.commons.lang.ArrayUtils;

public class AdjustArraySize {
	public double[] getX1() {
		return x1;
	}

	public double[] getX2() {
		return x2;
	}

	private double[] x1;
	private double[] x2;

	public AdjustArraySize(double[] x1, double[] x2) {
		int t = x1.length - x2.length;
		if (t > 0) {
			this.x1 = ArrayUtils.subarray(x1, 0, x1.length - t);
			this.x2 = x2;
		}
		else {
			this.x1 = x1;
			this.x2 = ArrayUtils.subarray(x2, 0, x2.length + t);
		}
	}
	
	
}
